using System;
using System.Windows.Forms;

using FreeFlow.Administration;

namespace FreeFlowAdministrator
{
	/// <summary>
	/// Summary description for FieldAdaptor.
	/// </summary>
	public class FieldAdaptor : Adaptor
	{
    private Field field;
		public FieldAdaptor(Field field)
		{
      this.field = field;
		}

    public override int ImageIndex
    {
      get
      {
        return 10;
      }
    }

    public override string Text
    {
      get
      {
        return field.Name;
      }
    }

    public override Control GetRenderer()
    {
      FieldControl control = new FieldControl();
      control.LoadField(field);
      return control;
    }

    public override object Object
    {
      get
      {
        return field;
      }
    }
	}
}
